<template>
  <div class="admin-layout">
    <el-container>
      <el-aside width="200px" class="el-aside">
        <admin-nav />
      </el-aside>
      <el-container>
        <el-header class="admin-header">
          <crumb />
          <toolbar :store="userStore" />
        </el-header>
        <el-main class="admin-main">
          <router-view />
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script setup lang="ts">
import useUserStore from "@/store/user";
import adminNav from "./ui/adminNav.vue";
import toolbar from "./ui/toolbar.vue";
import crumb from './ui/crumb.vue'

const userStore = useUserStore();
</script>

<style lang="scss" scoped>
.admin-layout {
  height: 100%;
  .el-container {
    min-height: 100%;
    .el-aside {
      text-align: center;
      display: flex;
      justify-content: center;
      background-color: #f89898;
    }
  }
  .admin-header {
    background-color: var(--el-color-danger-light-5);
    color: var(--el-color-warning-dark-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
  }
  .admin-main{
    margin: 0;
    padding: 0;
  }
}
</style>  